<template>
  <div>
    <div style="padding:10px" class="items">
      <div v-for="e in list"
        style="width:100%;height:120px;border:1px solid #333;display:flex; margin-top: 10px;box-sizing:border-box;">
        <img style="width:118px;height:118px;margin-right: 10px;" :src="baseUrl + e.cturl" alt="">
        <div style="font-size:18px;display:flex;flex-direction: column;justify-content: space-around;font-size: 15px;">
          <div>上传时间:{{ dayjs(+e.createTime).format('YYYY-MM-DD HH:mm:ss') }}</div>

          <div v-if="JSON.parse(e.result).data.res == 0">识别结果: <span style="color:#07c160;font-weight: 600;">{{ e.result
        ?
        JSON.parse(e.result).res1 : '' }}</span> </div>
          <div v-if="JSON.parse(e.result).data.res == 1">识别结果: <span style="color:#ff976a;font-weight: 600;">{{ e.result
        ? JSON.parse(e.result).res1 : '' }}</span> </div>
          <div v-if="JSON.parse(e.result).data.res == 2">识别结果:<span style="color:#f85149;font-weight: 600;">{{ e.result
        ? JSON.parse(e.result).res1 : '' }}</span> </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import dayjs from "dayjs";
import { ref } from "vue";
const baseUrl = ref(import.meta.env.VITE_IMAGE_URL)
withDefaults(
  defineProps<{
    list?: any;
  }>(),
  {
    list: [],
  }
);

</script>

<style scoped></style>
